using System;
using System.Drawing;
using System.Collections;
using System.ComponentModel;
using DevExpress.XtraReports.UI;

namespace QLTV.Reports
{
    public partial class rptCrewList4 : DevExpress.XtraReports.UI.XtraReport
    {
        public rptCrewList4()
        {
            InitializeComponent();
            loadData();
        }

        private void loadData()
        {
            lableDate.Text = DateTime.Now.Date.ToString("dd-MMM-yyyy");
            lblNguoiXuat.Text = Program.EmployeeName;
        }
        int no = 0;
        private void Detail_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            no++;
            stt.Text = no.ToString();

        }

        private void SoNguoiPhuThuoc_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            //Database.dsReportTableAdapters.tadQuanHe tad=new Database.dsReportTableAdapters.tadQuanHe();
            //oNguoiPhuThuoc.Text= tad.Fill(dsReport1.tblQuanHe,GetCurrentColumnValue("nCrewId").ToString()).ToString();
        }

        private void cel3So_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            if (cel3So.Text != "")
                cel3So.Text = cel3So.Text.Substring(0, 3);
        }

        private void cell1_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            if (cell1.Text != "")
                cell1.Text = cell1.Text.Substring(4, 1);
        }

        private void cell5_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {
            if (cell5.Text != "")
                cell5.Text = cell5.Text.Substring(6, 5);
        }

        private void cell4_BeforePrint(object sender, System.Drawing.Printing.PrintEventArgs e)
        {

            if (cell4.Text != "")
                cell4.Text = cell4.Text.Substring(12, 4);
        }

    }
}
